package com.stars.empoly.utils.dialog

import android.content.Context
import com.stars.empoly.inte.ChoiceData

/**
 * 选择时间
 *
 *on 2020/9/26
 */
object ChoseTimeDialog {


    fun choseTime(context: Context,chosedata: ChoiceData){
        var beginDeadTime="2017-01-01"
        var defaultWeekBegin:String=""
        var defaultWeekEnd:String=""
        var time:String=""

        var mDoubleTimeSelectDialog=DoubleTimeSelectDialog(context,beginDeadTime,defaultWeekBegin,defaultWeekEnd)

        mDoubleTimeSelectDialog.setOnDateSelectFinished { startTime, endTime ->

            time = startTime.replace("-", "-") + "至" + endTime.replace("-", "-")
            chosedata.onRestuse(time)

        }
        mDoubleTimeSelectDialog.setOnDismissListener {

        }

        mDoubleTimeSelectDialog.recoverButtonState()
        mDoubleTimeSelectDialog.show()

    }


}
